package com.crowntit.infrastructure.gateway.dto.gbm;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class QueryProductConfigResDTO {
    private List<Team> teamList;
    private Goods goods;

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Team {
        private String teamId;
        private Long activityId;
        private String userId;
        private Integer targetCount;
        private Integer lockCount;
        private Integer completeCount;
        private Date validStartTime;
        private Date validEndTime;

        // 倒计时(字符串) validEndTime - validStartTime
        private String validTimeCountdown;

        /**
         * 外部交易单号-确保外部调用唯一幂等
         */
        private String outTradeNo;
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Goods {
        private String goodsId;
        private String goodsName;
        private Long activityId;
        private BigDecimal originalPrice;
        private BigDecimal deductionPrice;
        private BigDecimal payPrice;
    }
}
